package com.dlut.txy.designpattern.chainofresponsibility.approve2;

import com.dlut.txy.designpattern.chainofresponsibility.approve1.entity.AskForLeaveRequest;
import com.dlut.txy.designpattern.chainofresponsibility.approve1.impl.FirstApproveHandler;
import com.dlut.txy.designpattern.chainofresponsibility.approve1.impl.ThirdApproveHandler;

public class Test01 {
    public static void main(String[] args) {
        AskForLeaveApproveHandlerChain askForLeaveApproveHandlerChain = new AskForLeaveApproveHandlerChain();
        askForLeaveApproveHandlerChain.addHandler(new FirstApproveHandler());
        askForLeaveApproveHandlerChain.addHandler(new ThirdApproveHandler());
        askForLeaveApproveHandlerChain.handleRequest(new AskForLeaveRequest(1, "2023年05月29日11:01:00", 15));
    }
}
